-- GENERATED SPELL FOR [Forsaken Crossbowman] --


function spell0_23883(pUnit, Event) --@Frost Shot,n/a--
pUnit:FullCastSpellOnTarget(18802,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23883', 10259, 1)
end

function spell1_23883(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(6660,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23883', 608, 1)
end

function spell2_23883(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(42131,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23883', 1000, 1)
end

function Sorts_23883(pUnit, Event)
local choix_sorts_23883 = math.random(0, 2)
if choix_sorts_23883 == 0 then
pUnit:RegisterEvent('spell0_23883', 1, 1)
end
if choix_sorts_23883 == 1 then
pUnit:RegisterEvent('spell1_23883', 1, 1)
end
if choix_sorts_23883 == 2 then
pUnit:RegisterEvent('spell2_23883', 1, 1)
end
end

function mob23883_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23883', math.random(1500, 3000), 1)
end

function mob23883_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23883_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23883_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23883, 1, 'mob23883_Action')
RegisterUnitEvent(23883, 2, 'mob23883_Leave')
RegisterUnitEvent(23883, 3, 'mob23883_Kill')
RegisterUnitEvent(23883, 4, 'mob23883_Die')
